package com.city.service.report.impl;/*
 * @Author: 李顺时
 * @Description:
 * @Date: Create in 14:43 2018/9/7
 * @Modified By:
 * */

import com.city.domain.report.CtGeospatial;
import com.city.repository.report.CtGeospatialRepository;
import com.city.service.report.CtGeospatialService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CtGeospatialServiceImpl implements CtGeospatialService {

    @Autowired
    private CtGeospatialRepository geospatialRepository;

    @Override
    public CtGeospatial findCtGeospatialById(Integer id) {
        return geospatialRepository.findOne(id);
    }

    @Override
    public List<CtGeospatial> findAll() {
        return geospatialRepository.findAll();
    }

    @Override
    public List<CtGeospatial> findAllByGathererName(String gathererName) {
        return geospatialRepository.findAllByGathererName(gathererName);
    }

    @Override
    public CtGeospatial saveGeospatial(CtGeospatial ctGeospatial) {
        return geospatialRepository.save(ctGeospatial);
    }
}
